home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 187_01 / strupper.c < prev    next >
C/C++ Source or Header  |  1986-02-24  |  905b  |  28 lines

  1. /*@*****************************************************/
  2. /*@                                                    */
  3. /*@ strupper - change all letters in a string to       */
  4. /*@        upper case.                                 */
  5. /*@                                                    */
  6. /*@   Usage:     strupper(str);                        */
  7. /*@       where str is a string.  It is converted in   */
  8. /*@         place.                                     */
  9. /*@                                                    */
  10. /*@   Result:  It returns the address of str.          */
  11. /*@                                                    */
  12. /*@                                                    */
  13. /*@*****************************************************/
  14.  
  15.  
  16. strupper(str)
  17. char *str;
  18. {
  19.     char *save;
  20.  
  21.     save = str;
  22.     while (*str) {
  23.         *str = toupper(*str);
  24.         str++;
  25.     }
  26.     return save;
  27. }
  28.